home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr30
/
mdaux102.zip
/
MDAUX.DOC
next >
Wrap
Text File
|
1993-05-11
|
8KB
|
201 lines
MDAUX Device Driver v01.02.00 11 MAY 1993
Copyright (c) 1988 - 93 Professional Software Engineering
All rights reserved.
See also the companion Freeware utility, MONOCLS for clearing the secondary
monochrome screen (reguardless of whether you use MDAUX).
I wrote MDAUX for debugging on PC systems. It takes over the AUX device (a
device made available to all running programs), and directs it's output to a
secondary Monochrome Display ("MD").
I used to use a serial printer at times to log debugging status during a
program's execution (I used a Parallel printer normally, but also had a
crummy serial printer attached as well). This worked out well, since one
could run the program without the overhead of a debugger and have hardcopy.
It didn't work so well when my serial printer croaked. However, by that time
I already had a secondary display on my computer for debugging (using
Periscope). So I trashed the serial printer, and wrote this utility to
utilize the mono display as the status device. I no longer had a hardcopy,
but the speed was improved (and I didn't need to concern myself with setting
the port speed anymore either), and it was so much quieter (which is great
for midnight debugging sessions).
MDAUX will only allow itself to be installed if it detects an MDA *AND* that
MDA is the secondary (i.e. not the display that DOS is using by default). It
occupies about 464 bytes.
INSTALLATION:
add the following line in CONFIG.SYS:
DEVICE=[pathspec]MDAUX.SYS
(MDAUX can be loaded high).
When the driver loads, you should see the monochrome display flicker/flash
(this is actually intentional). AUX is operating through the MDA.
A quick test of functionality is:
DIR>AUX
or even:
TYPE filename>AUX
Whatever would normally have appeared through STDOUT should appear on the
secondary display.
The cursor is turned on whenever the AUX device is opened (usually by DOS
when it launches an application), and turned off whenever AUX is closed. The
driver does not care if AUX is "Opened" or "Closed" when it recieves a write
request.
When a FormFeed (ASCII 12 decimal) character is recieved, it will clear the
screen and home the cursor position. This is useful for programs which want
to display a full-screen of debug information every so often and wish to keep
most of the information in the same locations (since there is no
ANSI-equivalent interpretation going on).
There is a utility, OX.SYS in use (mostly by Microsoft Windows developers)
which performs an almost identical task to MDAUX. I am unaware of the
origins of the OX.SYS utility (it may have originated in an early version of
the SDK). I understand that it is in the Public Domain, but there is no
source code for it.
MDAUX is indeed similar to OX.SYS, but for the 32 bytes of additional memory
usage of MDAUX, you get:
MDAUX homes to the TOP of the screen. OX only inserts everything on
the bottom line (i.e. every linefeed causes the entire screen to
scroll -- MDAUX has 25 lines of display before everything moves on
you).
OX uses the original keyboard vectors for AUX input. Geez, this is a
tricky thing to deal with (I suggest programs don't use AUX for input
unless you are using a separate terminal). I could have used the
original keyboard vectors for AUX input, but I have noticed that OX
seemed to hang with a variety of different keyboard TSR programs. I
chose instead to use the current keyboard vectors for AUX input --
there may be an occasional problem with this, but it seems much more
stable that way. If you know of a good way to handle this, please
contact me.
MDAUX supports FormFeed to clear the screen. There is no such
capability in OX.
A Banner message is displayed informing you that MDAUX is installing
(or why it won't install). OX doesn't tell you anything. You don't
know it is installed unless you check.
MDAUX clears the AUX screen when the driver installs. Many of my
co-workers who use OX must initialize the monochrome display by
performing a mode switch to the monochrome display (MODE MONO) and
back (MODE CO80), which leaves a DOS prompt on the AUX screen, and
ends up resetting the primary display (which is often originally in
50 line mode, which then must be reset, and will have lost any
contents it had before the mode switch). This is unneccessary with
MDAUX, since it initializes the hardware for you -- without affecting
the primary display. Not all MDA boards seem to require this fancy
footwork by the user, but for those that do, this simplifies things
somewhat.
MDAUX will not install if there is no MDA present (and it must be the
secondary display, not the primary). This is an important difference
-- if you pull out your Monochrome display, or make it the primary,
MDAUX simply will not install, and AUX will remain as the first
serial port. However, OX.SYS *WILL* install, and subsequently write
to the (non-existent) MDA memory. There are three potential problems
with this: OX installs and uses memory when it isn't doing anything
for you, AUX is no longer available as a device (you may wish to
be outputting to the serial port), and (most importantly), if you
don't have an MDA, and you use an upper memory manager (EMM386, QEMM,
386MAX, NetRoom, etc.), that memory that OX is writing to is likely
to be important stuff -- mabey even your hard disk cache... whoops.
MDAUX translates LF (linefeed) to CR/LF pairs.
It is not recommended to use AUX for debugging messages while using the
secondary display -- things get messy on the MDA screen. It is not
considered dangerous, just messy.
I have not tested MDAUX within the Microsoft Windows Software Development Kit
environment. If you envounter problems, please forward descriptions to me,
and I will check out fixing them.
If you program in C, you can use the following to send a message through the
AUX device:
fprintf(stdaux, "This is a message\n");
The driver converts LF to CR/LF combinations, but does no such translation on
CRs. Thus:
for ( i = 0 ; i < 2000 ; i++ )
{
fprintf(stdaux, "\rcounter: %d", i);
}
will display a running counter using the same locations on the screen.
Tabs are translated to 8 space tab stops.
Only TAB, LF, CR, and FF are interpreted. All other characters are
passed to the screen unchanged, including the BEL (beep) character, which
shows up as an enlarged dot.
Here's legal in your eyes:
This program must be distributed unmodified and in it's entirety (program
and this documentation). No files may be added to the archive (such as BBS
advertisements), ZIP (or other archive format) headers permitting, provided
that they do not claim ownership of the material. It is not to be bundled
with other software, Commercial, Shareware, Freeware, or otherwise.
So-called "shareware" disk distribution sites must contact me for approval
before distributing this software if they charge in excess of $3.95 per disk.
Failure to comply with these requirements will subject you to prosecution to
the full extent provided by U.S. Copyright Law, including provisions from the
Berne Convention.
The standard disclaimer applies:
This program works for me within the (actually quite complex) environment in
which I use it. I make no warranty that it will work in all environments or
on all hardware platforms. I cannot be held responsible for any damages which
may result from it's use. By using this software, you agree to hold Sean
Straw / Professional Software Engineering clear of any liability for damages,
including but not limited to, lost data, damaged hardware, and loss of income.
Your mileage may vary. Void where prohibited.
However, should you encounter problems with this program, I would like to
hear about them so that I may attempt to correct the problems (time and
equipment permitting).
This program is Shareware. I don't ask much for it -- a paltry US $5.00.
Send registrations to:
Sean Straw
Professional Software Engineering
Post Box 2395
San Rafael, CA 94912-2395
Please be sure to state "Registration for MDAUX", and the version number when
registering.
A $15.00 service charge will be levied on returned cheques.